package com.haha.community.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.Email;
import javax.validation.constraints.Size;

/**
 * <p>
 * 
 * </p>
 *
 * @author Yang
 * @since 2020-10-30
 */
@Data
public class User implements Serializable {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @Size(min = 6,message = "用户名的长度最小为6")
    private String username;
    @Size(min = 6,message = "密码长度的最小值为6")
    private String password;

    private String salt;
    @Email(message = "请填写正确的邮箱地址")
    private String email;

    /**
     * 0-普通用户; 1-超级管理员; 2-版主;
     */
    private Integer type;

    /**
     * 0-未激活; 1-已激活;
     */
    private Integer status;

    private String activationCode;

    private String headerUrl;

    private Date createTime;


}
